package org.penguin.study.bk.log.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.penguin.study.bk.base.api.UUIDEntity;
import org.penguin.study.bk.validator.custom.IpAddress;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author chengyinghua
 */
@Data
@TableName("tbl_event_logs")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(title = "tbl_event_logs表对象", description = "日志信息")
public class EventLog extends UUIDEntity implements Serializable {

    private static final long serialVersionUID = 5641150745501647678L;

    private String id;

    private String operatorId;

    private String operatorFullName;

    private String requestData;

    // @Pattern(regexp = "^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}$")
    @IpAddress
    private String requestIp;

    private LocalDateTime requestTime;

    private String responseData;

    private LocalDateTime responseTime;
}
